home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / curonoff.arc / CURONOFF.ASM next >
Encoding:
Assembly Source File  |  1986-11-14  |  1.7 KB  |  56 lines

  1. comment /
  2. Yes, friends, here is another Beta version of ASM modules cranked out by yours
  3. truly.  This is just a very small mod of CURON-CUROFF from Technotes and the
  4. Utilities disk.  Problem started when CUROFF screwed up my cursor.  First I
  5. fixed that by changing the value of CX to 200fh from 0f0fh before INT 10 call.
  6. Then I said what the hey, why not combine both and save myself a slot for a
  7. LOADable module (usually all full up).  So I just combined CURON and CUROFF,
  8. making CURONOFF.  As far as I know, it should work with CGA and mono but with
  9. EGA etc. I dunno, don't have the reference materials.  Let me know if it does
  10. not work with your monitor please.
  11. Enjoy!
  12.  
  13. Syntax: 
  14. LOAD CURONOFF
  15. CALL CURONOFF WITH "F" turns it off
  16. CALL CURONOFF turns it on
  17. CALL CURONOFF WITH <anything but "F"> turns it on
  18.  
  19.  
  20.  
  21. R. Russell Freeland (Synergy Corp.)
  22. voice: 305-792-1866
  23. Compuserve 76146,371
  24. 11-14-86
  25. /
  26.  
  27.  
  28.  
  29.  
  30. CODESEG SEGMENT
  31.          assume CS:CODESEG
  32. CURONOFF PROC FAR
  33. ORG 0
  34.  
  35. START:
  36.            cmp     Byte Ptr DS:[bx],'F'      ;did you pass an "F"?
  37.            jne     ON                        ;no, turn cursor on
  38. OFF:
  39.            mov     CX,200fh                  ;else turn it off code in CX
  40.            jmp     CALLROM                   ;call the BIOS
  41. ON:
  42.            int     11h                       ;find out what kind of equip.
  43.            mov     CX,0607h                  ;assume color
  44.            and     AL,10h                    ;check tho
  45.            jz      NOTMONO                   ;OK? jump
  46.            mov     CX,0B0Ch                  ;whoops, mono, set CX
  47. NOTMONO:
  48. CALLROM:
  49.            mov     AH,01
  50.            int     10h
  51. DONE:
  52.            RET
  53. CURONOFF  ENDP
  54. CODESEG   ENDS
  55. END   START
  56.